<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>05Js流程控制</title>
</head>
<body>
<script>
    if ('3' < '10') {
        console.log('表的的数值')
    } else {
        console.log('比较的编码')
    }

    var gender;
    switch (gender) {
        case 1:
            console.log('先生');
            break;
        case 2:
            console.log('女士');
            break;
        default:
            console.log('保密');
    }


    let names = ['张三', '李四', '王五', '赵六', '钱七'];
    for (var i = 0; i < names.length; i++) {
        console.log(names[i]);
    }
    //增强型for循环
    //names 是当前需要遍历的 集合或数组
    //let n 表示本轮循环的
    for (let n of names){
        console.log(n)
    }

</script>

</body>
</html>